#!/usr/bin/perl -wT

use Template;

# some useful options (see below for full list)
my $config = {
  INTERPOLATE => 1,  # expand "$var" in plain text
  POST_CHOMP  => 0,  # cleanup whitespace
  PRE_CHOMP   => 0,
  EVAL_PERL   => 1,  # evaluate Perl code blocks
};

# create Template object
my $template = Template->new($config);

# define template variables for replacement
my $vars = {
   data => [['UNO','DOS','TRES'],[1,2,3], [3,4,5], [6,7,8], [8,9,10], [12,15,100], ["Hola","Mundo","!"]],
};

# specify input filename, or file handle, text reference, etc.
my $input = shift || "latex_template.txt";

# process input template, substituting variables
$template->process($input, $vars)
  || die $template->error();



